package com.deyuanyun.pic.pig.service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.deyuanyun.pic.pig.controller.query.QueryListVO;
import com.deyuanyun.pic.pig.controller.vo.PigTaskVO;
import org.springframework.stereotype.Service;

import com.deyuanyun.pic.pig.domain.EvluationVO;
import com.deyuanyun.pic.pig.mapper.PigTaskMapper;
import com.deyuanyun.pic.pig.service.CleanPipeLineHistoryService;

@Service
public class CleanPipeLineHistoryServiceImpl implements CleanPipeLineHistoryService {
	@Resource
	private PigTaskMapper pigTaskMapper;

	@Override
	public List<PigTaskVO> getCleanPipeLineHistoryIndex(QueryListVO vo) {
		vo.setStaus(new Integer[]{4});
		return pigTaskMapper.queryPigTask(vo);
	}

	@Override
	public Map<String, Object> goEvluation(String[] ids,Map<String, Object> map) {
		map.put("ids", ids);
		/**
		 * 管道清管总体评价
		 */
		EvluationVO headValue = pigTaskMapper.getHeadValue(map);
		/**
		 * 每次清管评价图表
		 */
		List<EvluationVO> listValue = pigTaskMapper.getListValue(map);
		map.put("headValue", headValue);
		map.put("listValue", listValue);
		return map;
	}

}
